{% extends 'PHPDishWebBundle:Common:setting_layout.html.twig' %}


{% block title %} 修改资料 {% endblock %}
{% block script %}
    <script type="text/javascript" src="{{ asset('build/js/setting.js') }}"></script>
{% endblock %}

{% block setting_content %}

    <div class="panel panel-u">
        <div class="panel-heading">编辑资料</div>
        <div class="panel-body">
            {{ form_start(form, {'attr': {'id':  'change-profile-form'}}) }}
            <div class="form-group">
                {{ form_label(form.email) }}
                {{ form_widget(form.email, {'attr': {'class': 'form-control', 'placeholder': '邮箱'}}) }}
                {{ form_errors(form.email) }}
            </div>
            <div class="form-group">
                {{ form_label(form.gender) }}
                {{ form_widget(form.gender, {'attr': {'class': 'form-control', 'placeholder': '性别'}}) }}
                {{ form_errors(form.gender) }}
            </div>
            <div class="form-group" id="upload-cover">
                {{ form_label(form.avatar) }}
                <div class="upload-cover clearfix">
                    <div id="pick-image" class="upload-camera-icon"><i class="if i-camera"></i></div>
                    <div class="preview-image"><img data-role="preview" class="img-responsive" src=""/></div>
                </div>
            </div>
            <div class="form-group">
                {{ form_label(form.description) }}
                {{ form_widget(form.description, {'attr': {'class': 'form-control', 'placeholder': '个性签名'}}) }}
                {{ form_errors(form.description) }}
            </div>
            <div class="form-group">
                {{ form_label(form.profile.url) }}
                {{ form_widget(form.profile.url, {'attr': {'class': 'form-control', 'placeholder': '个人主页'}, 'required': false}) }}
                {{ form_errors(form.profile.url) }}
            </div>
            <div class="form-group">
                {{ form_label(form.profile.company) }}
                {{ form_widget(form.profile.company, {'attr': {'class': 'form-control', 'placeholder': '公司'}, 'required': false}) }}
                {{ form_errors(form.profile.company) }}
            </div>
            <div class="form-group">
                {{ form_label(form.profile.location) }}
                {{ form_widget(form.profile.location, {'attr': {'class': 'form-control', 'placeholder': '位置'}, 'required': false}) }}
                {{ form_errors(form.profile.location) }}
            </div>
            <div class="form-group">
                <button type="submit" class="btn u-btn-primary submit-btn"><i class="if i-publish"></i> 修改</button>
            </div>
            {{ form_end(form) }}
        </div>
    </div>

{% endblock %}